<?php

namespace console\components\db;

/**
 * Connection
 * 
 * @author emhome <emhome@163.com>
 * @since 2.0
 */
class Connection extends \yii\db\Connection {

    /**
     * @see \yii\db\Connection::createCommand
     */
    public function createCommand($sql = null, $params = []) {
        $this->open();
        $command = new Command([
            'db' => $this,
            'sql' => $sql,
        ]);
        return $command->bindValues($params);
    }

}
